package org.jetlinks.test.event;

import org.reactivestreams.Publisher;
import org.springframework.context.ApplicationEventPublisher;
import reactor.core.publisher.Mono;

import java.util.function.Function;

public interface AsyncEvent {
    Mono<Void> getAsync();

    void first(Publisher<?> publisher);

    void transformFirst(Function<Mono<?>, Publisher<?>> mapper);

    void transform(Function<Mono<?>, Publisher<?>> mapper);

    Mono<Void> publish(ApplicationEventPublisher eventPublisher);
}
